package java67_16;

import java67_15.dog.Dog;

//拐卖老师
public class TeacherGernate {
	// 生成老师
	public Object generateTeacher(int type, String name, String school) {
		if (type == 1) {
			return new KGCJavaTeacher(name, school);
		} else if (type == 2) {
			return new KGCDotNetTeacher(name, school);
		} else if (type == 3) {
			return new UITeacher(name, school);
		}
		return new Dog("老狗");
	}
}
